import request from '@/utils/request'

// 查询生产采购列表
export function listPomMstr(query) {
  return request({
    url: '/purchase/pomMstr/list',
    method: 'get',
    params: query
  })
}

// 查询生产采购详细
export function getPomMstr(pomId) {
  return request({
    url: '/purchase/pomMstr/' + pomId,
    method: 'get'
  })
}

// 新增生产采购
export function addPomMstr(data) {
  return request({
    url: '/purchase/pomMstr',
    method: 'post',
    data: data
  })
}

// 修改生产采购
export function updatePomMstr(data) {
  return request({
    url: '/purchase/pomMstr',
    method: 'put',
    data: data
  })
}

// 删除生产采购
export function delPomMstr(pomId) {
  return request({
    url: '/purchase/pomMstr/' + pomId,
    method: 'delete'
  })
}

export  function changePomMstr(podDjbh,ztbz,reson) {
  return request({
    url: '/purchase/pomMstr/changePomMstr/' + podDjbh +'/'+ ztbz +'/'+ reson,
    method: 'put'
  })
}

// 导出生产采购
export function exportPomMstr(query) {
  return request({
    url: '/purchase/pomMstr/export',
    method: 'get',
    params: query
  })
}
